﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace thinger.VisitionDAL
{
    public class H5UPlus
    {
        H5U h5u = new H5U();
        public void Bing(H5U h5u)
        {
            this.h5u = h5u;
        }
        public bool DoWriteH5U(int d, int s)
        {
            var result = h5u.WriteH5U(d, s.ToString());//检测A面完成给信号
            if (result.IsSuccess)
            {
                return true;
            }
            return false;
        }

        public string GetReadH5U(int d)
        {
            var result = h5u.ReadH5U(d);//检测A面完成给信号
            if (result.IsSuccess)
            {
                return result.Message;
            }
            return "";
        }

        /// <summary>
        /// 判断是否读到d的值等于dd
        /// </summary>
        public bool IsReadH5U(int d,string dd)
        {
            var result = h5u.ReadH5U(d);
            if (result.Message==dd)
            {
                return true;
            }
            return false;
        }




    }
}
